From 453759ebf78ea10184bd5c71bad03328bbaad4fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= Date: Tue, 25 Nov 2025 15:26:09 +0100 Subject: [PATCH] capsLockWarning: Mark as not visible to a11y tree when hidden We're animating it away, but not for the a11y tree. This fixes it, so the caps lock warning is not read regardless of the state of the key. Part-of: (cherry picked from commit ccd1a0b8f52e29ccd2356c5d2ac34e473b174cd0) --- js/ui/shellEntry.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index a69bffa5f..6cd153727 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -1,3 +1,4 @@ +import Atk from 'gi://Atk'; import Clutter from 'gi://Clutter'; import GObject from 'gi://GObject'; import Pango from 'gi://Pango'; @@ -202,6 +203,14 @@ class CapsLockWarning extends St.Label { let [, height] = this.get_preferred_height(-1); this.natural_height_set = naturalHeightSet; + if (capsLockOn) { + this.add_accessible_state(Atk.StateType.SHOWING); + this.add_accessible_state(Atk.StateType.VISIBLE); + } else { + this.remove_accessible_state(Atk.StateType.SHOWING); + this.remove_accessible_state(Atk.StateType.VISIBLE); + } + this.ease({ height: capsLockOn ? height : 0, opacity: capsLockOn ? 255 : 0, -- 2.39.5